-
-
Notifications
You must be signed in to change notification settings - Fork 534
[19.0] [MIG] queue_job: migrate + tests #840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
/ocabot migration queue_job |
|
/ocabot migration test_queue_job |
hoangtrann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
appreciate all the work you done here! please review the comments since I notice many weird comments and many changes should be in another PR instead of a migration one
1bb209c to
6d330f2
Compare
|
@hoangtrann quick update:
I’d also really appreciate it if you could take a look at PR #842—specifically the tests: You can run the suite locally with (use any throwaway DB name in place of ./odoo/odoo-bin -c odoo.conf -d <DB_NAME> Thanks again for the thorough and detailed review—really grateful for your contributions and feedback 🙏 |
hoangtrann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are still some comments stating odoo 19 scattered across the changes which I thing we should removed.
for anyone comes after these are removed, I think it's good to just summarized the major changes to the description of the pr which can also works as a good resource for reference in other mig pr
Resolved in: d27f83d |
6b95a96 to
038c334
Compare
hoangtrann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
|
From my checks and tests, this is all ready to go. Can it be merged? |
|
@tishmen have you tested this version with the preforkserver configuration (using Additionally, there is an error due to the upstream config refactoring in this method: |
|
@PieterPaulussen fyi, workers mode working fine here, is the runner starting properly on your end?
|
PieterPaulussen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tishmen Thanks for your effort on this. On the whole, this PR does the trick, but there are a lot of additional changes that are not essential to the module migration. In my opinion, you will get faster approvals if you slim down the changes to the bare minimum given the complexity of this module.
If you want to keep the translations in this PR, can we go one step further and use positional arguments for all translated string variables? This results in more flexibility for other languages during translating.
On the refactoring of the tests to remove the reliance on the demo_user, I would beg to differ. Unittests should rely on the presence of the demo data, just as the core does.
Finally, I would like to stress the following issue that I encountered during a local test with your code: #840 (comment)
The jobrunner does not seem to enqueue AND process the queue jobs when running is preforked server configuration. This issue should be addressed first.
@nilshamerlinck Curious, could you share your worker and channel configuration please? In my test, the jobs got enqueued, but were never actually processed. |
|
@tishmen Please take a look at this commit. I would create a PR for your branch, but for some reason I couldn't do it. It's a fix related to a change in |
|
This PR has the |
|
@pedrobaeza Sorry for tagging you here again but you are the only one that I know has merge rights. Would you mind merging this? Thanks in advance. |
|
I plan to read the latest comments and re-review soon(ish). Maybe next week. It the meantime, nothing prevents using it, and reporting further issues if any. |
|
@tishmen Well done - all I can really say is, that I'm glad my PR was superseded - 😜 Overall, I really think we should be getting these PRs for migrations through as efficiently as possible. I know everyone has their opinions, and where code has been touched or altered, it is great to aim for perfection, but if the changes are not wrong, if they are not regressive, then there should be no obligation to "improve" during a migration. Nice if it does, but it should not be obligatory. After watching this unfold, I will be VERY uninclined to offer a module migration, as my objective will be to get the module across as is, and correct, not suddenly inheriting everyone else's wishlists... Of course, this does not mean dismissing anyone's reviews or input without due and proper consideration, but the end game of a migration PR seems different for different people.... |
sbidoul
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this looks great now.
A few last minor things, and one more important one for performance of graph handling in the read_group rewrite.
|
@sbidoul I will take care of all of the code review comments this weekend. Thanks for your feedback. |
|
Sorry for the delay — I’ve pushed updates addressing the review feedback (style nits, test cleanups, and the _read_group perf tweak). Pre-commit is green again. Please take another look when you have a moment. |
|
@sbidoul can we help somehow on this? Just a question, there is need for so many migration commits or should it be squashed in a single one? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had these last comments pending.
|
About the commits, this helped during review but I suppose it's best to squash them now. Then we can merge. |
- Migrate queue_job, test_queue_job and base_import_async to 19.0
0ae333a to
4275cdb
Compare
|
Thanks for all this work @tishmen ! /ocabot merge nobump |
|
Hey, thanks for contributing! Proceeding to merge this for you. |
|
Congratulations, your PR was merged at 1f23acd. Thanks a lot for contributing to OCA. ❤️ |
|
@sbidoul Thanks! And also huge thanks to everyone who reviewed, commented, and helped move this forward 🙏 |
|
See also #872 for the latest improvements from 18. Also we should replace the autovacuum cron with a |
|
Thanks for the pointer! 👍@sbidoul I’ll take care of this in a separate PR this weekend (switching to the @api.autovacuum decorator and adding the migration to remove the cron). Also, it would be greatly appreciated if the remaining OCA Queue–related PRs could get some review time as well. I really like to get them ready for merging. 📣 Call for help: if anyone reading this has some bandwidth to review or test the other Queue PRs, help would be very welcome. Thanks everyone! PR Links: |


Scope
Summary
Pre-commit
Tests
./odoo/odoo-bin -c odoo.conf -d odoo_queue_pr_queue_job_base_001 --init queue_job,test_queue_job --test-tags="/queue_job,/test_queue_job" --stop-after-init